import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../pages/home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'home',
    // component: HomeView
    component: () => import(/* webpackChunkName: "home" */ '../pages/home.vue')
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../pages/about.vue')
  },
  {
    path: '/CompositionAPI__Test',
    name: 'CompositionAPI__Test',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../pages/test_composition_API.vue')
  },
  {
    path: '/test_hello',
    name: 'test_hello',
    component: () => import(/* webpackChunkName: "about" */ '../pages/test_hello.vue')
  },
  {
    path: '/test_ts',
    name: 'test_ts',
    component: () => import(/* webpackChunkName: "about" */ '../pages/test_ts.vue')
  },
  {
    path: '/test_input',
    name: 'test_input',
    component: () => import(/* webpackChunkName: "about" */ '../pages/input.vue')
  },
  {
    path: '/test_shell',
    name: 'test_shell',
    component: () => import(/* webpackChunkName: "about" */ '../pages/shell.vue')
  },
  {
    path: '/dialog',
    name: 'dialog',
    component: () => import(/* webpackChunkName: "about" */ '../pages/dialog.vue')
  },
  {
    path: '/clipboard',
    name: 'clipboard',
    component: () => import(/* webpackChunkName: "about" */ '../pages/clipboard.vue')
  },
  {
    path: '/nedb',
    name: 'nedb',
    component: () => import(/* webpackChunkName: "about" */ '../pages/nedb.vue')
  },
  {
    path: '/ajax',
    name: 'ajax',
    component: () => import('../pages/ajax.vue')
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
